import url from '../url-config.js'
import req from '../request'
const getWarnByEnterprise = ({ id }) => req.get(url.home.getWarnByEnterprise, { id })
const getWarns = ({ date }) => req.get(url.home.getWarns, { date })

const getPerformDuties = ({ id }) => req.get(url.home.performDuties, { id })
const getDangerList = ({ id }) => req.get(url.home.dangerList, { id })
const getKeyDynamicsList = ({ codeId, type }) => req.get(url.home.keyDynamicsList, { codeId, type })
const exportGovernmentReport = ({ id, date }) => req.get(url.exportGovernmentReport, { id, date }, 'arraybuffer')
const exportCompanyReport = ({ id, date }) => req.get(url.exportCompanyReport, { id, date }, 'arraybuffer')
export const homeApi = {
    getWarnByEnterprise,
    getWarns,
    getPerformDuties,
    getDangerList,
    getKeyDynamicsList,
    exportGovernmentReport,
    exportCompanyReport,
}
